The present invention relates to digital cameras, and more particularly, to an improved method for converting data from a camera sensor to a color image.
A digital color image usually consists of an array of pixel values representing the intensity of the image at each point on a regular grid. Typically, three colors are used to generate the image. At each point on the grid the intensity of each of these colors is specified, thereby specifying both the intensity and color of the image at that grid point.
Conventional color photography records the relevant image data by utilizing three overlapping color sensing layers having sensitivities in different regions of the spectrum (usually red, green, and blue). Digital cameras, in contrast, typically utilize one array of sensors in a single xe2x80x9clayerxe2x80x9d.
When only one sensor array is used to detect color images, only one color may be detected at any given sensor location. As a result, these sensors do not produce a color image in the traditional sense, but rather a collection of individual color samples, which depend upon the assignment of color filters to individual sensors. This assignment is referred to as the color filter array (CFA) or the color mosaic pattern. To produce a true color image, with a full set of color samples (usually red, green and blue) at each sampling location, a substantial amount of computation is required to estimate the missing information, since only a single color was originally sensed at each location in the array. This operation is typically referred to as xe2x80x9cdemosaicingxe2x80x9d.
To generate the missing information, information from neighboring pixels in the image sensor must be used. A number of algorithms have been put forward in an attempt to provide the missing information while minimizing artifacts resulting from the estimation process. The simplest algorithms interpolate the sensor data from like color sensors to provide the missing information. These algorithms treat the red sensors as being independent from the green sensors, and so on. To provide a red value at a given location, the values measured by the red sensors in the region of that location are interpolated. This approach requires that the image be low-pass filtered. Such filtering reduces the image resolution below the pixel resolution of the underlying sensor array. This lost resolution cannot be recovered.
In addition, systems that treat the color sensors independently can generate color artifacts in some images. These artifacts express themselves as streaks of false colors in the restored image, and are especially apparent around boundaries between different objects in the image and in textured areas.
To avoid the loss in resolution discussed above, less aggressive optical low-pass filtering is used in some higher-end cameras. However, in such systems, the color sensors may no longer be treated as independent. For example, Wober, et al. (U.S. Pat. No. 5,475,769) describe a method for generating the missing color information by computing a weighted average of the pixel values in the neighborhood of the pixel whose missing color information is being computed. This method weights values from all of the color sensors, not just the color being reconstructed. However, even this approach leaves much to be desired since it utilizes one set of weights for all images, and hence, there are always images in which unwanted artifacts are generated.
Broadly, it is the object of the present invention to provide an improved image processing method for converting data from a pixel array having non-overlapping sensors to a fully sampled digital image.
It is a further object of the present invention to provide a conversion method that does not generate the color artifacts discussed above.
These and other objects of the present invention will become apparent to those skilled in the art from the following detailed description of the invention and the accompanying drawings.
The present invention is a method for operating a data processing system to generate a second image from a first image having partially sampled color values at each pixel. The first image includes a two-dimensional array of pixel values, each of the pixel values corresponding to the light intensity in one of a plurality of spectral bands at a location in the first image. The second image includes a second two-dimensional array of color vectors. Each color vector has a light intensity value for each of the spectral bands. There is one such vector corresponding to each location having a pixel value in the first image. One component of the vector is equal to the pixel value in the first image at that location. The present invention computes the missing color components at each location. The method begins by providing an estimate for each component that is not equal to one of the pixel values from the first image for each vector. An updated estimate for each of the estimates is then generated by optimizing a weighted sum of first and second functions. The first function measures the degree of roughness of the second image, and the second function measures the degree to which the vectors change direction between neighboring locations in the second image.